package t20211204;

/**
 * @Author: DengJia
 * @Date: 2021/12/4 17:57
 * @Description:
 */

public class Parcel {
    class Contents {
        private int i = 11;

        public int value() {
            return i;
        }
    }

    class Destination {
        private String label;

        public Destination(String whereTo) {
            label = whereTo;
        }

        String readLabel() {
            return label;
        }
    }

    public Destination to(String s) {
        return new Destination(s);
    }

    public Contents contents() {
        return new Contents();
    }

    public void ship(String dest) {
        Contents c = contents();
        Destination d = to(dest);
        System.out.println(d.readLabel());
    }

    public static void main(String[] args) {
        Parcel p = new Parcel();
        p.ship("CHINA");
        Parcel p1 = new Parcel();
        Contents c = p1.contents();
        Destination d = p1.to("CHENGDU");

    }
}
